package de.tum.in.eist.poll.server.dao;

import java.util.List;

import de.tum.in.eist.poll.shared.beans.Student;
import de.tum.in.eist.poll.shared.beans.User;


/**
 * UserDaoInterface gives access to a User storage.
 * 
 * @author The EIST-POLL-21 team
 *
 */
public interface UserDaoInterface {
	/**
	 * Add a user to the store
	 * 
	 * @param user the user to add
	 */
	public void 	add(User user);
	
	/**
	 * Get the user with a given ID
	 * 
	 * @param userID the ID of the user to return
	 * @return the user
	 */
	public User 	get(String userID);
	
	/**
	 * Get a {@Student}s based on a {@link Lecturer}s ID.
	 * The returned students belong to that lecturer.   
	 * 
	 * @param lecturerID the ID of that lecturer
	 * @return a list of students
	 */
	public List<Student> getStudentsByLecturer(String lecturerID);
	
	/**
	 * Get all {@link User}s known to the server
	 * 
	 * @return a list of all users
	 */
	public List<User> 	 getAll();
	
	/**
	 * Check whether a {@User} with given ID is known to the server
	 * 
	 * @param userID the ID of the user to ask for
	 * @return true if the user exists, else false
	 */
	public boolean 	exists(String userID);
	
	/**
	 * Delete a {@link User} from the server
	 * 
	 * @param userID the ID of the user to delete
	 */
	public void		delete(String userID);
	
	/**
	 * Get the number of {@link User}s known to the system.
	 * 
	 * @return the number of users
	 */
	public int      numberOfUsers();
}